from llama_index.llms.openai import OpenAI
import time
import os
from llama_index.core.llms import ChatMessage

llm = OpenAI(model="gpt-4o-mini")

messages = [
    ChatMessage(role="system", content="你是一个帮助用户解决问题的助手"),
    ChatMessage(role="user", content="介绍一下李白"),
]
chat_response = llm.chat(messages)
print(chat_response.message.content)
